package com.buptlogistics.creditinvestigation.fragment;

import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.ListView;

import com.buptlogistics.creditinvestigation.R;
import com.buptlogistics.creditinvestigation.app.BaseFragment;

import java.util.ArrayList;
import java.util.List;

/**
 * 包名：com.buptlogistics.creditassess.fragment
 * 类描述：
 * 创建人：fuxuemingzhu
 * 邮箱：fuxuemingzhu@163.com
 * 创建时间：2015/9/26 23:11
 * <p/>
 * 修改人：fuxuemingzh"u
 * 修改时间：2015/9/26 23:11
 * 修改备注：
 *
 * @version 1.0
 */
public class CircleInfoFragment extends BaseFragment {

    private View view;
    private ListView ll_info;
    private List<String> infoList = new ArrayList<>();
    private ArrayAdapter<String> infoAdapter;


    public CircleInfoFragment() {
        // Required empty public constructor
    }


    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
                             Bundle savedInstanceState) {
        view = inflater.inflate(R.layout.fragment_circle_info, container, false);
        initViews();
        initEvents();
        return view;
    }

    protected void initViews() {
        ll_info = (ListView) findViewById(R.id.ll_circle_info);
    }

    protected void initEvents() {
        infoList.add("2016国内羊肉价格趋势预测");
        infoList.add("2015年羊肉制品行业分析报告");
        infoAdapter = new ArrayAdapter<String>(CircleInfoFragment.this.getActivity(), android.R.layout
                .simple_expandable_list_item_1, infoList);
        ll_info.setAdapter(infoAdapter);
    }

    protected View findViewById(int id) {
        return view.findViewById(id);
    }

}
